<template>
	<div>
	     <h1>{{title}}</h1>
		 <hr>
		 <Commentbox :goodsid="route.query.id"></Commentbox>
		 
	</div>
</template>

<script setup>
	import Commentbox from "./Commentbox.vue"
	import {getCurrentInstance,ref} from "vue"	
	let {proxy: {axios,url}} = getCurrentInstance()
	import {useRoute} from "vue-router"
	let route=useRoute()
	// console.log(route.query.id,"1111111111111")
	let title=ref("")
	async function loaddata(){
		let res=await axios.get("/api/goodsdetail",{params:{id:route.query.id}})
		console.log(res.data)
		title.value=res.data[0].title
	}
	loaddata()
</script>

<style>
</style>